{% extends "data_list.html" %}
{% load i18n %}
{% block content %}
<div id="content" ></div>

{% endblock %}
{% block getdatalist %}
{% endblock %}

{% block op_for_tab %}
{% endblock %}
{% block export %}
{% endblock %}
{% block addjs %}

var lClass;
$(function(){
    fun_attparam();
});


function fun_attparam(){
	$("#id_newrec").remove();
	$("#id_clearrec").remove();
	$("#content").html("");
	$.ajax({ 
	        type: "POST",
	        url:"{{dbapp_url}}../att/AttParamSetting/",
	        dataType:"json",
	        success:function(json){
	            var arr=json
	            lClass=arr.LeaveClass;
	            chk_TwoDay=arr.TwoDay;
	            chk_OTCheckRecType=arr.OTCheckRecType;
	            chk_OutCheckRecType=arr.OutCheckRecType;
	            chk_NoInAbsent=arr.NoInAbsent;
	            chk_NoOutAbsent=arr.NoOutAbsent;
	            chk_TakeCardIn=arr.TakeCardIn;
	            chk_TakeCardOut=arr.TakeCardOut;
				
				chk_jbd_action_type = arr.jbd_action_type;
				
	            chk_EarlyAbsent=arr.EarlyAbsent;
	            chk_LateAbsent=arr.LateAbsent;
	            chk_OutOverTime=arr.OutOverTime;
	        	chk_filter_emp = arr.filter_emp;
	
	            $("#content").html(""
	            +"<form id='id_edit_form' method='post'><table class='content_tbl attParam' align='left' style='width:97%; margin-left:5px;'><tbody><tr><td>"
	            +"<div class='div_box1 floatL' style='width:98%'><h2>{%trans '基础设置'%}</h2><table id='tbl1'><tbody>"

	          
	            +"<tr>"
                    +"<th><label for='id_MinShiftInterval' class='required'>{%trans '最短的考勤时段应大于:'%}</label></th>"
                    +"<td><input type='text' maxlength='30' name='MinShiftInterval' id='id_MinShiftInterval' value='"+(arr.MinShiftInterval)+"'/>{%trans '分钟'%}</td>"
                +"</tr>"
                +"<tr>"
                
	                +"<th><label for='id_MaxShiftInterval' class='required'>{%trans '最长的考勤时段不超过:'%}</label></th>"
	                +"<td><input type='text' maxlength='30' name='MaxShiftInterval' id='id_MaxShiftInterval' value='"+(arr.MaxShiftInterval)+"'/>{%trans '分钟'%}</td>"
	            +"</tr>"
				
                +"<tr>"
					+"<th><label for='id_MaxShiftInterval' class='required'>{%trans '上班签到取卡规则:'%}</label></th>"
	                +"<td><select id='TakeCardIn'  name='TakeCardIn' style='*width:136px !important;'>"
	                +"<option value='1'>{%trans '就近原则'%}</option>"
	                +"<option value='2'>{%trans '最早原则'%}</option></select>&nbsp;&nbsp;</td>"
	            +"</tr>"

                +"<tr>"
	                +"<th><label for='id_MaxShiftInterval' class='required'>{%trans '下班签到取卡规则:'%}</label></th>"
	                +"<td><select id='TakeCardOut'  name='TakeCardOut' style='*width:136px !important;'>"
	                +"<option value='1'>{%trans '就近原则'%}</option>"
	                +"<option value='2'>{%trans '最晚原则'%}</option></select>&nbsp;&nbsp;</td>"
	            +"</tr>"
				
                +"<tr>"
	                +"<th><label for='id_MaxShiftInterval' class='required'>{%trans '加班单作用方式:'%}</label></th>"
	                +"<td><select id='jbd_action_type'  name='jbd_action_type' style='*width:136px !important;'>"
	                +"<option value='1'>{%trans '以主计算结果为准'%}</option>"
					+"<option value='2'>{%trans '以加班单结果为准'%}</option>"
	                +"<option value='3'>{%trans '以时长较小者为准'%}</option></select>&nbsp;&nbsp;</td>"
	            +"</tr>"
				
	            +"<!-- <tr>"
	              +"<th><label for='id_WorkWeekStartDay' class='required'>{%trans '每周从:'%}</label></th>"
	              +"<td><select id='id_WorkWeekStartDay' name='WorkWeekStartDay'>"+getWeek(arr.WorkWeekStartDay)+"</select>{%trans '开始' %}</td>"
	              +"<th><label for='id_WorkMonthStartDay' class='required'>{%trans '每月从:'%}</label></th>"
	              +"<td><select name='WorkMonthStartDay' id='id_WorkMonthStartDay'>"+getDay(arr.WorkMonthStartDay)+"</select>{%trans '开始' %}</td>"
	          +"</tr>"
	            
	            +"<tr>"
	                +"<th><label for='id_Out' class='required'>{%trans '外出状态:'%}</label></th>"
	                +"<td><input  type='radio'  name='OutCheckRecType' id='id_Out0' value='0'/>{%trans '忽略该考勤状态'%}<br />"
	                +"<input  type='radio'  name='OutCheckRecType' id='id_Out1' value='1' />{%trans '表示为一般外出'%}<br />"
	                +"<input  type='radio'  name='OutCheckRecType' id='id_Out2' value='2'/>{%trans '表示为因公外出'%}<br />"
	                +"<input  type='radio'  name='OutCheckRecType' id='id_Out3' value='3' />{%trans '进行审核'%}</td>"
	
	                +"<th><label for='id_OT' class='required'>{%trans '加班状态:'%}</label></th>"
	                +"<td><input type='radio' name='OTCheckRecType' id='id_OT0' value='0'/>{%trans '忽略该考勤状态'%}<br />"
	                +"<input type='radio' name='OTCheckRecType' id='id_OT1' value='1'/>{%trans '直接记为加班'%}<br />"
	                +"<input  type='radio'  name='OTCheckRecType' id='id_OT2' value='2' />{%trans '进行审核'%}</td>"
	            +"</tr> -->"
	            +"</tbody></table></div></td></tr>"
	
	
	            +"<tr><td><div class='div_box1 floatL' style='width:98%'><h2>{%trans '考勤计算'%}</h2><table id='tbl2'><tbody>"
	             +"<tr>"
               
	                +" <!-- <th width='240px' style='display:none'><label for='id_MinsWorkDay' class='required'>{%trans '一个工作日记为:'%}</label></th>"
	                +"<td width='230px' style='display:none'><input type='text' maxlength='30' name='MinsWorkDay' class='wZBaseCharField' id='id_MinsWorkDay' value='"+(arr.MinsWorkDay)+"'/>{%trans '分钟'%}</td> -->"
	
                    +"<th><input class='displayN' type='checkbox' maxlength='30' name='LateAbsent' id='id_LateAbsent' checked='checked'/><label class='required'>{%trans '一次迟到大于:'%}</label></th>"
                    +"<td><input type='text' maxlength='30' name='MinsLateAbsent' id='id_MinsLateAbsent' value='"+(arr.MinsLateAbsent)+"'/>{%trans '分钟时记为旷工.'%}</td>"
             +"</tr>"
             +"<tr>"
             
                    +"<th><input class='displayN' type='checkbox' maxlength='30' name='EarlyAbsent' id='id_EarlyAbsent' checked='checked'/><label class='required'>{%trans '一次早退大于:'%}</label></th>"
                    +"<td><input type='text' maxlength='30' name='MinsEarlyAbsent' id='id_MinsEarlyAbsent' value='"+(arr.MinsEarlyAbsent)+"'/>{%trans '分钟时记为旷工.'%}</td>"
                  
	              
	            +"</tr>"
	
	            +"<tr>"
	                +"<th><input class='displayN'  type='checkbox' maxlength='30' id='id_NoInAbsent' /><label>{%trans '上班无签到记录时记:'%}</label></th>"
	                +"<td><select id='id_type_in' onchange='remove_MinsNoIn(this)'  name='NoInAbsent' style='*width:136px !important;'>"
	                +"<!--<option value='0'>{%trans ' '%}</option>--><option value='1'>{%trans '迟到'%}</option>"
	                +"<option value='2'>{%trans '旷工'%}</option></select>&nbsp;"
	                +"{% trans "for" %}&nbsp;<span id='is_show_in' style='display:none;'><input type='text' id='id_MinsNoIn' size='4' name='MinsNoIn' value='"+(arr.MinsNoIn)+"'></input>{%trans '分钟'%}</span></td>"
                  +"</tr>"

	            +"<tr>"
	                +"<th><input class='displayN' type='checkbox' maxlength='30'  id='id_NoOutAbsent' /><label>{%trans '下班无签退记录时记:'%}</label></th>"
	                +"<td><select id='id_type_Out' onchange='remove_MinsNoOut(this)' name='NoOutAbsent' style='*width:136px !important;'><!--<option value='0'>{%trans ' '%}</option>--><option  value='1'>{%trans '早退'%}</option><option value='2'>{%trans '旷工'%}</option></select>"
	                +"&nbsp;{% trans "for" %}&nbsp;<span id='is_show_out' style='display:none;'><input type='text' id='id_MinsNoOut' size='4' name='MinsNoOut' value='"+(arr.MinsNoOut)+"'></input>{%trans '分钟'%}</span></td>"
  
	            +"</tr>"
                  +"<tr style='display:none'>"
                  
                    +"<th><input class='displayN' type='checkbox' maxlength='30' name='OutOverTime' id='id_OutOverTime' checked='checked' /><label>{%trans '下班' %}:</label></th>"
                    +"<td ><input type='hidden' maxlength='30' name='MinsOutOverTime' id='id_MinsOutOverTime' value='"+(arr.MinsOutOverTime)+"'/>{%trans '分钟后签退记加班'%}</td>"
                 
                 
	              
	            +"</tr>"

	            +"</tbody></table></div></td></tr>"
	
	            +"<tr><td><div class='div_box1 floatL' style='width:98%'><h2>{%trans '计算项目'%}</h2><table style='margin-left:100px;'><tbody>"
	            +"<tr>"
	                +"<td><select id='id_items' size='8' style='width:150px;'>"
	                +getItems(lClass)+"</select></td>"
	                +"<td width='500px' style='vertical-align:top;'><span id='show_item'>"
	                +"<span class='fontB'>{%trans '最小单位:'%}</span><br /><input type='text' size='4px' id='id_MinUnit' name='MinUnit' value='' />&nbsp;&nbsp;"
	                +"<select id='id_Unit' name='Unit' width='100px'>"+get_Unit()+"</select><span id='id_validate_Min' class='error'></span><br />"
	               
	                +"<div style='height:5px; overflow:hidden;'></div><div ><span class='fontB'>{%trans '舍入控制:'%}</span><br /><input type='radio' id='id_RemaindProc0' name='RemaindProc' value='0'>{%trans '向下(舍弃) '%}&nbsp;&nbsp;"
	                +"<input type='radio' id='id_RemaindProc1' name='RemaindProc' value='1'>{%trans '四舍五入'%}&nbsp;&nbsp;"
	                +"<input type='radio' id='id_RemaindProc2' name='RemaindProc' value='2'>{%trans '向上(进位)'%} "
	                +"<div class='displayN'><input type='checkbox' id='id_Round_byTime' name='Round_byTime' >{%trans '按次计算'%}&nbsp;&nbsp;"
	                +"<input type='checkbox' id='id_RemaindCount' name='RemaindCount'>{%trans '累计后再进行舍入'%}<br /></div></div></span></span>"
	                +"<div style='height:5px; overflow:hidden;'></div><span class='fontB'>{%trans '报表中的表示符号:'%}</span><br /><input type='text' size='5px' value='' id='id_ReportSymbol' name='ReportSymbol'>"
	                +"</td>"
	            +"</tr>"
	            +"</tbody></table></div></td></tr>"
	            
	            +"<tr><td><div class='div_box1 floatL' style='width:98%'><h2>{%trans '离职人员'%}</h2><table ><tbody>"
	            +"<tr>"
                +"<th><label for='filter_emp' >{%trans '是否显示离职人员:'%}</label></th><td><select id='filter_emp'  name='filter_emp' style='*width:136px !important;'>"
	                +"<option value='0'>{%trans '否'%}</option>"
	                +"<option value='1'>{%trans '是'%}</option></select>&nbsp;&nbsp;&nbsp;&nbsp;{%trans '注意：当前参数是用来控制(补签卡、加班单、请假、调休、考勤报表)操作页面的选人控件是否显示出已离职人员，系统默认为不显示！'%}"
                +"</td>"
	            +"</tr>"
	            +"</tbody></table></div></td></tr>"
	            
	            +'<tr><td colspan="2"><span id="id_error" style="display:none;"></span></td></tr>'
	            +"<tr><td>"			
	            +"<div class='editformbtn'><div class='lineH22'><span class='action_OK'>&nbsp;</span><a id='id_submit'class='Link_blue1' href='javascript:void(0)' >{%trans '确定' %}</a><div class='clear'></div></div></div>"
	            +"<input type='hidden' id='id_LeaveClass' value='"+get_lClass_String(getChange_lClass(lClass))+"' name='LeaveClass'/>"
	            +"<input type='hidden' id='hidden_LeaveId' value='' name='Leave'/>"
	            +"</td></tr>"
	            
	            +"</table></tbody></form>"
	            );
	            //$("#content").css("padding-left",100)   
	            $("#id_Out"+chk_OutCheckRecType).click();
	            $("#id_OT"+chk_OTCheckRecType).click();
	            $("#id_TwoDay"+chk_TwoDay).click();

	            if(chk_EarlyAbsent==1){ 
	                $("#id_EarlyAbsent").attr("checked","checked");
	            }  
	            if(chk_LateAbsent==1)
	            {
	             $("#id_LateAbsent").attr("checked","checked");
	            }
	            if(chk_OutOverTime==1)
	            {
	             $("#id_OutOverTime").attr("checked","checked");
	            }
	            $("#filter_emp").val(chk_filter_emp);
	            if(chk_NoInAbsent>0)
	            {
	             $("#id_NoInAbsent").attr("checked","checked");
	             $("#id_type_in").val(chk_NoInAbsent);
	                if(chk_NoInAbsent==1)
	                    $("#is_show_in").css("display","inline");
	
	            }
	            if(chk_NoOutAbsent>0)
	            {
	             $("#id_NoOutAbsent").attr("checked","checked");
	             $("#id_type_Out").val(chk_NoOutAbsent);
	                if(chk_NoOutAbsent==1)
	                    $("#is_show_out").css("display","inline");
	            }
				
	            if(chk_TakeCardIn>0)
	            {
	             	$("#TakeCardIn").val(chk_TakeCardIn);
	            }
	            if(chk_TakeCardOut>0)
	            {
	             	$("#TakeCardOut").val(chk_TakeCardOut);
	            }chk_jbd_action_type
				
	            if(chk_jbd_action_type>0)
	            {
	             	$("#jbd_action_type").val(chk_jbd_action_type);
	            }
					
	            $("#id_NoInAbsent").click(function(){
	                if(!$("#id_NoInAbsent").attr("checked"))
	                {
	                    $("#id_type_in").val(0);
	                    $("#is_show_in").css("display","none");
	                    
	                }
	            });
	            $("#id_NoOutAbsent").click(function(){
	                if(!$("#id_NoOutAbsent").attr("checked"))
	                {
	                    $("#id_type_Out").val(0);
	                    $("#is_show_out").css("display","none");
	                }
	            });
	
	            $("#id_items").click(function(){//计算项
	                item_id=$("#id_items").val();
                    
	                lClass=getChange_lClass(lClass);
	                $("#id_LeaveClass").val(get_lClass_String(lClass));
	                $("#hidden_LeaveId").val(item_id);
	                $("#id_validate_Min").css("display","none");
	                for(i=0;i<lClass.length;i++)
	                    if(lClass[i].LeaveId==item_id)
	                        show_selected_item(lClass[i]);
	                if(item_id==1008||item_id==1009||item_id==1007)
	                    $("#show_item").css("display","none");
	                else
	                    $("#show_item").css("display","block");
	
	
	            });
	            $("#id_Unit").change(function(){ //控制单位  
	                 
	                 if($("#id_Unit").val()==4)
	                     is_by_times(4);
	                 else
	                    $("#id_validate_Min").css("visibility","hidden");
	             });
	
	             $("#id_Round_byTime").click(function(){ //对按次计算规则控制
	                 
	                 if($("#id_Round_byTime").attr("checked"))
	                 {
	                     is_by_times(4);
	                    $("#id_validate_Min").css("visibility","hidden");
	                 }
	                 else{
	                    is_by_times(0);
	                    $("#id_validate_Min").html("<font size='2' color='#ff6600'>{%trans ' 请选择单位' %} </font>");
	                    $("#id_validate_Min").css("visibility","visible");
	                    
	                    }
	             });
                if(lClass.length>0)
                {
                    $("#id_items").val(lClass[0].LeaveId);
                    
                    $("#id_items").click()
                    //show_selected_item(lClass[0]);
                }
                
	            //表单验证MinSMinRecordInterval
	            $('#id_edit_form').validate({
	                        rules: {
	                            "MaxShiftInterval": {required:true,digits:true,min:240,max:1200},
	                            "MinShiftInterval": {required:true,digits:true,min:10,max:240},
	                            "MinRecordInterval": {required:true,"digits":true,"min":0,"max":240},
	                            "MinsWorkDay": {required:true,"digits":true},
	                            "MinsLate": {required:true,"digits":true,"min":0,"max":240},
	                            "MinsEarly": {required:true,"digits":true,"min":0,"max":240},
	                            "MinsNoIn": {required:true,"digits":true,"min":0,"max":480},
	                            "MinsNoOut": {required:true,"digits":true,"min":0,"max":480},
	                            "MinsLateAbsent": {required:true,"digits":true,"min":1,"max":480},
	                            "MinsOutOverTime": {required:true,"digits":true,"min":10,"max":240},
	                            "MinsEarlyAbsent": {required:true,"digits":true,"min":1,"max":480},
	                            "MinUnit": {required:true,"min":0.1,"max":60},
	                            "ReportSymbol": {"maxlength":2}
	                        }
	            });
	            $("#id_submit").click(function(){
                        $("#id_error").css("display","none");;
                        var bln_submit=true
                        try
                        {
                           
                            $('#id_edit_form').find("input").each(function(){
                               if($(this).valid()=="0")
                                {
                                    bln_submit=false;
                                }
                            });
                        }
                        catch(e)
                        {
                            
                        }
                        
                        if (bln_submit)
                        {
                            getLastLclass(lClass);	
                            var queryStr=$("#id_edit_form").formSerialize();
                            $.ajax({ 
                                type: "POST",
                                url:"{{dbapp_url}}../att/SaveAttParamSetting/",
                                data:queryStr,
                                dataType:"text",
                                success:function(retdata){
                                    if(retdata.indexOf("result=0")==0){
                                        $("#id_error").css("display","block");
                                        $("#id_error").html("<ul class='successlist'><li>{%trans '保存参数成功'%}</li></ul>");
                                    }
									else
									{
                                        $("#id_error").css("display","block");
                                        $("#id_error").html("<ul class='errorlist'><li>{%trans '"+retdata+"'%}</li></ul>");
									}
                                    }
                                }); 
                        }
	        		});

	var w=$("#tbl1>tbody>tr>th").eq(2).width();
	$("#tbl2>tbody>tr>th").eq(0).css({width:w});
	}});

	
}

var week=[
	     "{% trans '星期日' %}",
	     "{% trans '星期一' %}",
	     "{% trans '星期二' %}",
	     "{% trans '星期三' %}",
	     "{% trans '星期四' %}",
	     "{% trans '星期五' %}",
	     "{% trans '星期六' %}"
];
function getLastLclass(lClass){  //取得最后一个页面的最新值并更新lClass为最新
    lClass=getChange_lClass(lClass);
    $("#id_LeaveClass").val(get_lClass_String(lClass));
    return true;
}
function show_selected_item(sdata){  //显示选中项的各个参数的值
   
    $("#id_MinUnit").val(sdata.MinUnit);
    $("#id_Unit").val(sdata.Unit);
   
    $("#id_RemaindProc"+sdata.RemaindProc).click();
    $("#id_ReportSymbol").val(sdata.ReportSymbol);
    if(sdata.RemaindCount)
        $("#id_RemaindCount").attr("checked","checked");
     is_by_times(sdata.Unit);
}

function get_lClass_String(lc)  //构造字典字符串
{
    var result = "["
    if(lc.length>0){
        for(var i=0; i <lc.length; i++){ 
            row = lc[i];
            row_string = "{";
            for (var j in row){
                if(j=="ReportSymbol" || j=="LeaveName")
                    row_string += "\""+j + "\":\""+  row[j] + "\",";
                else 
                    row_string += "\""+j + "\":"  +  row[j] + ",";
                }
            row_string = row_string.substring(0, row_string.length-1)+"}";
        result += row_string + ",";
        }
    result = result.substring(0, result.length-1);
    }
    result+="]";
    return result;
}

function getChange_lClass(lClass)   //得到最新修改的字典lClass
{
    
    var LeaveId=$("#hidden_LeaveId").val();
    var Unit=$("#id_Unit").val();
    var MinUnit=$("#id_MinUnit").val();
    var ReportSymbol=$("#id_ReportSymbol").val();
    var RemaindProc;
    $("input[type=radio]","#show_item").each(function(i){
        if(this.checked) 
            RemaindProc=this.value;
    });
    if($("#id_RemaindCount").attr("checked"))
           RemaindCount=1;
    else
           RemaindCount=0;
    for(i=0;i<lClass.length;i++)
            if(lClass[i].LeaveId==LeaveId){
                lClass[i].MinUnit=MinUnit;
                lClass[i].Unit=Unit;
                lClass[i].RemaindProc=RemaindProc;
                lClass[i].RemaindCount=RemaindCount;
                lClass[i].ReportSymbol=ReportSymbol;
            }
    return lClass;
}

function is_by_times(Unit)  //对按次计算 的控制
{
    if(Unit==4)
        {   
            $("#id_MinUnit").attr("disabled","disabled");
            $("#id_Unit").val(Unit);
            $("#id_Unit").attr("disabled","disabled");
            $("#id_RemaindCount").attr("disabled","disabled");
            $("#id_RemaindCount").attr("checked",false);
            $("input[type=radio]","#show_item").attr("disabled","disabled");
            $("#id_Round_byTime").attr("checked","checked");
        }
    else{
            $("#id_MinUnit").removeAttr("disabled");
            $("#id_Unit").removeAttr("disabled");
            $("#id_Unit").val(Unit);
            $("#id_RemaindCount").removeAttr("disabled");
            $("input[type=radio]","#show_item").removeAttr("disabled","disabled");
            $("#id_Round_byTime").removeAttr("checked");
            
        }
}

function getItems(lcData)
{   var options_html="";
	for(i=0;i<lcData.length;i++)
		if(i==0)
            options_html+="<option value='"+lcData[i].LeaveId+"' selected>"+(lcData[i].LeaveName)+"</option>";
        else
            options_html+="<option value='"+lcData[i].LeaveId+"'>"+(lcData[i].LeaveName)+"</option>";
	
    return options_html;
} 

function remove_MinsNoIn(obj)
{
	if($(obj).val()=="1"){
		$("#id_NoInAbsent").attr("checked","checked");
        $("#is_show_in").css("display","inline");
	}
   else if($(obj).val()=="2")
    {   $("#id_NoInAbsent").attr("checked","checked");
        $("#is_show_in").css("display","none");
    }
	else{
		$("#is_show_in").css("display","none");
		$("#id_NoInAbsent").attr("checked","");
	}
}

function remove_MinsNoOut(obj)
{ 
   if($(obj).val()=="1"){
		$("#id_NoOutAbsent").attr("checked","checked");
        $("#is_show_out").css("display","inline");
	}
   else if($(obj).val()=="2")
    {   $("#id_NoOutAbsent").attr("checked","checked");
        $("#is_show_out").css("display","none");
    }
	else{
		$("#is_show_out").css("display","none");
		$("#id_NoOutAbsent").attr("checked","");
	}
}

function getWeek(selected_id){

    var options_html="";
    for(i=0;i<7;i++)
        if(i==selected_id)
            options_html+="<option value='"+i+"' selected>"+week[i]+"</option>";
        else
            options_html+="<option value='"+i+"'>"+week[i]+"</option>";

    return options_html;
}
function getDay(selected_id)
{
    var options_html="";
    for(i=1;i<=28;i++)

            if(i==selected_id)
                options_html+="<option value='"+i+"' selected>"+i+"</option>";
            else
                options_html+="<option value='"+i+"'>"+i+"</option>";

    return options_html;
 }
 var unit=[ 
			"{% trans '小时' %}",
			 "{% trans '分钟' %}",
            "{% trans '工作日' %}"
 ];
 function get_Unit()
 {
	var options_html="";
    for(i=1;i<=unit.length;i++)
        options_html+="<option value='"+i+"'>"+unit[i-1]+"</option>";

    return options_html;
 }

{% endblock %}




<style><style type="text/css">
td input[type=text],td textarea,td select,.vTextField {
border:1px solid #5B80B2;
width: 110px !important;
}
.div_box{ margin:0px !important ;padding:3px 10px 10px 10px; height:auto; width:100%;float:left;}
.div_box table{margin:10px !important;}
.div_box h1{background:url(../media/images/icon_title_left.gif) left no-repeat; padding-left:15px;color:#32598a; font-weight:bold; margin-bottom:10px;}
.content_tbl{width:98% !important; margin:0px !important;}
.content_tbl div{width:100% !important;}
.content_tbl td{padding:10px !important;}
.content_tbl td td,.content_tbl td th{padding:3px !important; vertical-align:top !important;}
</style>